#ifndef _RegularSampler_H_
#define _RegularSampler_H_

#pragma once
#include "Sampler.h"

class RegularSampler : public Sampler {
private:
	void generateSamples() {
		int n = int(sqrt(numSamples));
		samples.reserve(numSets * numSamples);

		for (int j = 0; j < numSets; j++)
			for (int p = 0; p < n; p++)
				for (int q = 0; q < n; q++)
					samples.emplace_back((q + 0.5) / n, (p + 0.5) / n);
	}

public:
	RegularSampler(int numSamples, int numSets = 1) : Sampler(numSamples, 1) {}
	~RegularSampler() {}
};


#endif // _RegularSampler_H_